package cn.crm.service;

import cn.crm.dao.CustomerMapper;
import cn.crm.pojo.BaseDict;
import cn.crm.pojo.Customer;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {
    @Resource
    private CustomerMapper customerMapper;
    @Override
    public List<Customer> find(String cust_name, String cust_source, String cust_industry,String cust_level) {
        return customerMapper.find(cust_name, cust_source, cust_industry,cust_level);
    }

    @Override
    public List<BaseDict> list(String dict_type_code) {
        return customerMapper.list(dict_type_code);
    }

    @Override
    public Customer findById(Integer cust_id) {
        return customerMapper.findById(cust_id);
    }

    @Override
    public int add(Customer customer) {
        return customerMapper.add(customer);
    }

    @Override
    public int update(Customer customer) {
        return customerMapper.update(customer);
    }

    @Override
    public int del(Integer cust_id) {
        return customerMapper.del(cust_id);
    }
}
